oh |
您所在的位置:网站首页 › oh my zsh 码云 › oh |
Linux + zsh + oh-my-zsh
谁用谁知道的上佳效果: 现在网上很多都是直接从github上拉去install.sh的,老是被墙,麻了,所以特地做个不墙的教程 环境准备 环境参数操作系统CentOS 7(这个无所谓,一般的x64操作系统都ok)软件环境zsh,Git(没有就用yum先装上) 切换系统命令行软件chsh -s /bin/zsh 下载 方法一:直接克隆项目建议从gitee上克隆,不会被墙(gitee.com/mirrors/oh-… ) 当然,用gitclone这家网站也可以,它里面教你怎么弄(gitclone.com/ ) 克隆项目: git clone https://gitee.com/mirrors/oh-my-zsh.git ~/.oh-my-zsh或 git clone https://gitclone.com/github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh 直接复制配置文件 cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc 配置生效:source ~/.zshrc 方法二:使用install.sh怎么说呢,其实这个可执行文件就在上面克隆项目里的/tools/install.sh 网上一般都会发: wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh换成gitee或者加上gitclone.com就行了 插件安装我推荐两款插件 历史记录补全 sudo git clone https://gitee.com/unrogue007/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions 代码高亮 sudo git clone https://gitee.com/unrogue007/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting 主题配置与生效 vim ~/.zshrc我们更改第11行:ZSH_THEME="ys",这个主题贴主极力推荐。其他主题可以参考www.zhihu.com/question/33… 我们随后更改73行的plugin部分: plugins=(git zsh-syntax-highlighting zsh-autosuggestions)保存退出 source ~/.zshrc就完成啦 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |